// Handy "macro"
function $(id){
  return document.getElementById(id);
}

function isError(response) {
  return typeof response == "string" && response.substring(0,9) == "!!ERROR!!";
}

function errorString(response) {
  return response.substring(9);
}
  
function getTaskAction(oData) {
  var pipe = oData.indexOf('|');
  return oData.substring(pipe+1);
}

function getTaskKey(oData) {
  var pipe = oData.indexOf('|');
  return oData.substring(0, pipe);
}

function formatTaskAction(elCell, oRecord, oColumn, oData) {
  elCell.innerHTML = getTaskAction(oData);
};

function trueString(str) {
  return str == "True" || str == "true" || str == "Yes" || str == "yes";
};
